<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>ReStructuredText</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/ReStructuredText"> <link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-ReStructuredText rootpage-ReStructuredText skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span lang="en">reStructuredText</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr"><p class="mw-empty-elt">
</p>
<div class="infobox_v3 infobox infobox--frwiki noarchive large"><div class="entete icon informatique" style="background-color:#C0C0C0"><div>ReStructuredText<style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */
.mw-parser-output .entete.informatique{background-image:url("./_mw_/Picto.nfo.png")}
/* end https://fr.wikipedia.org/ */
</style></div></div><div><div class="images" style="padding:2px 0"></div></div><table><caption style="text-align:center;background-color:#C0C0C0">Caractéristiques</caption><tbody><tr class=""><th scope="row"><a href="Type_de_m%C3%A9dias" title="Type de médias">Type MIME</a></th><td class=""><div>
<span class="wd_p1163"><code> text/x-rst</code></span></div></td></tr><tr class=""><th scope="row">Version initiale</th><td class=""><div>
<span class="wd_p571"><time class="nowrap date-lien" datetime="2002-04-02" data-sort-value="2002-04-02"><a href="2_avril" title="2 avril">2</a> <a href="Avril_2002" title="Avril 2002">avril</a> <a href="2002" title="2002">2002</a></time></span></div></td></tr><tr class=""><th scope="row">Type de format</th><td class=""><div>
<a href="Langage_de_balisage_l%C3%A9ger" title="Langage de balisage léger">Langage de balisage léger</a></div></td></tr><tr class=""><th scope="row">Site web</th><td class=""><div>
<span class="wd_p856"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="https://docutils.sourceforge.io/rst.html">docutils.sourceforge.io/rst.html</a></span></div></td></tr></tbody></table></div>
<p><b>reStructuredText</b> est un <a href="Langage_de_balisage_l%C3%A9ger" title="Langage de balisage léger">langage de balisage léger</a> utilisé notamment dans la documentation du langage <a href="Python_(langage)" title="Python (langage)">Python</a>.
</p><p>L'extension associée est parfois indiquée comme étant RST. L'<a href="Analyse_syntaxique" title="Analyse syntaxique">analyseur syntaxique</a> de référence est implémenté comme élément Docutils du <a href="Framework" title="Framework">cadre d'application</a> du langage de programmation <a href="Python_(langage)" title="Python (langage)">Python</a>, mais d'autres implémentations existent par ailleurs (par exemple <a href="Pandoc" title="Pandoc">Pandoc</a> en <a href="Haskell" title="Haskell">Haskell</a> ou JRst en <a href="Java_(technologie)" class="mw-redirect" title="Java (technologie)">Java</a>).
</p><p>reStructuredText permet d'exporter dans notamment les formats <a href="HTML" class="mw-redirect" title="HTML">HTML</a>, <a href="XML" class="mw-redirect" title="XML">XML</a>, <a href="LaTeX" title="LaTeX">LaTeX</a>, <a href="OpenDocument" title="OpenDocument">ODF</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Quelques_exemples">Quelques exemples</h2></div>
<p>Entêtes :
</p>
<div class="mw-highlight mw-highlight-lang-restructuredtext mw-content-ltr" dir="ltr"><pre><span></span><span class="gh">Titre 1</span>
<span class="gh">=======</span>
<span class="gh">Sous-titre</span>
<span class="gh">----------</span>
</pre></div>
<p>Listes :
</p>
<div class="mw-highlight mw-highlight-lang-restructuredtext mw-content-ltr" dir="ltr"><pre><span></span><span class="m">-</span> Un élément
<span class="m">-</span> second élément
<span class="m">-</span> Un sous-élément
<span class="m">-</span> Troisième élément
</pre></div>
<div class="mw-highlight mw-highlight-lang-restructuredtext mw-content-ltr" dir="ltr"><pre><span></span><span class="m">1)</span> Une liste numérotée
<span class="m">2)</span> Second élément de la liste numérotée
<span class="m">a)</span> Sous-élément
<span class="m">i)</span> Sous-sous-élément
<span class="m">3)</span> Troisième élément
</pre></div>
<div class="mw-highlight mw-highlight-lang-restructuredtext mw-content-ltr" dir="ltr"><pre><span></span><span class="m">#)</span> Un autre élément de liste numérotée
<span class="m">#)</span> Second élément
</pre></div>
<p>Liens nommés :
</p>
<div class="mw-highlight mw-highlight-lang-restructuredtext mw-content-ltr" dir="ltr"><pre><span></span>Une phrase avec un lien vers Wikipedia et le <span class="nv">`Linux kernel archive`</span>.
<span class="p">..</span> <span class="nt">_Wikipedia :</span> http://www.wikipedia.org/
<span class="p">..</span> <span class="nt">_Linux kernel archive :</span> http://www.kernel.org/
</pre></div>
<p>Liens anonymes :
</p>
<div class="mw-highlight mw-highlight-lang-restructuredtext mw-content-ltr" dir="ltr"><pre><span></span>Une autre phrase avec un <span class="s">`lien anonyme vers le site de Python`__</span>.
__ http://www.python.org/
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Voir_aussi">Voir aussi</h2></div>
<ul><li><a href="Asciidoc" class="mw-redirect" title="Asciidoc">Asciidoc</a></li>
<li><a href="Markdown" title="Markdown">Markdown</a></li>
<li><a href="Textile_(langage)" title="Textile (langage)">Textile (langage)</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Liens_externes">Liens externes</h2></div>
<ul><li><cite class="ouvrage" id="site_officiel" style="font-style: normal;"><span class="wd_p856"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="https://docutils.sourceforge.io/rst.html">Site officiel</a></span></cite></li>
<li><a rel="nofollow" class="external text" href="http://aful.org/wikis/interop/ReStructuredText">Introduction en français sur le site de l’AFUL</a></li>
<li><a rel="nofollow" class="external text" href="https://bashtage.github.io/sphinx-material/rst-cheatsheet/rst-cheatsheet.html">Documentation en anglais</a></li></ul>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de la programmation informatique</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2024-07-26" href="https://fr.wikipedia.org/wiki/?title=ReStructuredText&oldid=217133804">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>
</body></html>